class urlmanage:
    def __init__(self):
        self.new_urls=set()
        self.old_urls=set()
        
    def get_url(self):
        if len(self.new_urls)>0:
            url=self.new_urls.pop()
            self.old_urls.add(url)
            return url
        else:
            return None

    def get_allurl(self):
        return self.old_urls
    
    def set_url(self,url):
        #print(url)
        if url not in self.new_urls and url not in self.old_urls:
            self.new_urls.add(url)
